<?php
defined('BY_JYA') or exit('error');
$return=array();
$tabs=array(
	array('action'=>'/index/','title'=>'基本设置'),
	array('action'=>'/juhelog/','title'=>'短信日志'),
	array('action'=>'/test/','title'=>'前往测试'),
);
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$data=array_fields(array('mobile','tpl_id'),$postdata);
		$content= array('code'=>'666888');
		$return=$this->plugin('jy_juhesms')->sendsms($data['mobile'],$content,$data['tpl_id']);
		if($return==1){
			exi('发送成功');
		}elseif($return==0){
			exi('发送失败','error');
		}
	}
	$htmls=array(
		'type'=>'edit',
		'tabs'=>$tabs,
		'desc'=>'测试',
		'edit'=>array(
			array('type'=>'string','title'=>'测试手机号','name'=>'mobile'),
			array('type'=>'string','title'=>'模板id','name'=>'tpl_id','help'=>'为方便测试，请先创建一个没有变量的模板以供测试'),			
			)
	);
	$return['htmls']=$htmls;
	exi($return);

